<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');

class OnlineCategory_m extends MY_Model
{

    const TBL = 'online_category';

    function __construct()
    {
        parent::__construct();
    }

    /**
     * 获取多条
     * @param array  $where (e.g. array('field' =>'value',...))
     * @param string $limit
     * @param int    $start
     * @param string $field
     * @return mixed
     */
    public function get_all($field = "*", $orderBy = "asc")
    {
        $this->db->select($field);
        $this->db->order_by('order', $orderBy);
        $query = $this->db->get('fox_online_category');
        $data  = $query->result_array();
        $query->free_result();
        return $data;
    }
}
